<% layout("/common/layout.html",{"title":pageTitle+"报表统计"}){ %>
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-sm-8">
        <h2>${pageTitle!}报表统计</h2>
        <ol class="breadcrumb">
            <li><a href="${ctxPath}/admin/main">主页</a></li>
            <li>${pageTitle!}报表统计</li>
        </ol>
    </div>
    <div class="col-sm-2 pull-right">
        <div class="title-action">
        </div>
    </div>
</div>

<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="text-center">
                        <div class="btn-group">
                            <%
                            if(isNotEmpty(reportOrderList)){
                            for(order in reportOrderList){
                            var orderKey = order.key+'';
                            var active = orderId == orderKey?'active':'';
                            %>
                            <a href="#" id="${order.key!}" onclick="f(this.id)" class="btn btn-primary btn-sm btn-outline ${active}">&nbsp;${order.text!}</a>
                            <%
                            }}
                            %>
                        </div>
                    </div>
                    <div class="text-right">
                        <form action="/implementReport/view/index" method="post" role="form" class="form-inline">
                            <div class="form-group">
                                <select name="deptName" id="deptName" class="form-control searchValue">
                                    <%
                                    if(isNotEmpty(org)){
                                    for(o in org){
                                    if(last==o.orgName){
                                    %>
                                    <option value="${o.orgName!}" selected>${o.orgName!}</option>
                                    <%
                                    }
                                    else{ %>
                                    <option value="${o.orgName!}">${o.orgName!}</option>
                                    <%
                                    }
                                    }}
                                    %>
                                </select>
                            </div>
                            <button type="submit" id="search" class="btn btn-primary"><i class="fa fa-search"></i>&nbsp;搜索</button>
                        </form>
                    </div>
                </div>
                <div class="ibox-content">
                    <div id="allBox"></div>
                    <div class="panel-footer text-center clearfix">
                        <div class="col-sm-3">
                            <p><strong>办理完结:<span class="text-danger">${successCount!}</span>件</strong></p>
                        </div>
                        <div class="col-sm-3">
                            <p><strong>退件:<span class="text-danger">${backCount!}</span>件</strong></p>
                        </div>
                        <div class="col-sm-3">
                            <p><strong>收件:<span class="text-danger">${receiveCount!}</span>件</strong></p>
                        </div>
                        <div class="col-sm-3">
                            <p><strong>办理中:<span class="text-danger">${acceptedCount!}</span>件</strong></p>
                        </div>
                        <div class="col-sm-3">
                            <p><strong>合计:<span class="text-danger">${allCount!}</span>件</strong></p>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<% } %>
<script type="text/javascript">
    //页面JS调用
    require(['monitor/report'], function (report) {
        //全部
        report.as('allBox',${titleList!},${allCountList!},${successCountList!},${receiveCountList!},${backCountList!},${acceptedCountList!});
    });
   function f(obj){
     var deptName=$("#deptName").val();
     alert(deptName)
     location.href="/itemApasinfoReport/view/"+obj+"?deptName="+deptName;
    }
</script>
